interface PagingItem {
  pageNum: number;
  pageSize: number;
}
export interface TagItem {
  key: string;
  value: string;
}
interface QueryDurationItem {
  end: string;
  start: string;
  step: string;
}
export interface DataParams {
  endpointId: string;
  maxTraceDuration: number;
  minTraceDuration: number;
  paging: PagingItem;
  queryDuration: QueryDurationItem;
  queryOrder: string;
  serviceId: string;
  serviceInstanceId: string;
  tags: TagItem[];
  traceId: string;
  traceState: string;
}

export interface DataItem {
  title: string;
  duration: number;
  endpointNames: string[];
  isError: true;
  segmentId: string;
  start: string;
  traceIds: string[];
}
interface LogDataItem {
  key: string;
  value: string;
}
interface LogItem {
  data: LogDataItem[];
  time: number;
}
interface RefItem {
  parentSegmentId: string;
  parentSpanId: number;
  traceId: string;
  type: string;
}

export interface TraceItem {
  component: string;
  endTime: number;
  endpointName: string;
  isError: boolean;
  layer: string;
  logs: LogItem[];
  parentSpanId: number;
  peer: string;
  refs: RefItem[];
  segmentId: string;
  serviceCode: string;
  serviceInstanceName: string;
  spanId: number;
  startTime: number;
  tags: TagItem[];
  traceId: string;
  type: string;
  x: number;
  y: number;
  daughter: string[];
  nodeId: string;
}
export interface InstanceParams {
  duration: QueryDurationItem;
  serviceId: string;
}
export interface InstanceItem {
  key: string;
  label: string;
}
export interface ServiceParam {
  duration?: QueryDurationItem;
  keyword?: string;
}
export interface ServiceItem {
  key: string;
  label: string;
}
export interface EndpointParam {
  keyword: string;
  limit: number;
  serviceId: string;
}

export interface EndpointItem {
  key: string;
  label: string;
}
export interface TagValueParam {
  duration: QueryDurationItem;
  tagKey: string;
}

export interface InstanceInfoParam {
  serviceCode: string;
  serviceInstanceName: string;
  startTime: number;
  endTime: number;
}

export interface InstanceInfoItem {
  instanceId: string;
  instanceRouteLinks: string;
  instanceVersion: string;
  serviceId: string;
}
